from os import getcwd
from yaml import safe_load
def get_config(mode = "langhuan"):
  options = {}
  rootDir = getcwd()
  filename = f"{rootDir}/config/local.config.yaml"
  filename = filename.replace("\\", "/", -1)
  with open(filename, "r") as file:
    list = safe_load(file)
    for key, val in list.items():
      options[key] = val
  if mode is not None and options.get(mode) is not None:
    return options.get(mode)
  else:
    return options